﻿using AnjLab.SyncIT.Core.Api;

namespace AnjLab.SyncIT.Core.Data.DotProject
{
    public class DotProjectProvider : Provider
    {
        public override bool HasPassword
        {
            get { return true; }
        }

        public override string Icon
        {
            get { return @"resources\dotProject.ico"; }
        }

        public override ISourceTaskDao CreateTaskDao(Source source)
        {
            return new DotProjectTaskDao(source);
        }

        public override string GetMyTasksUrl(Source source)
        {
            return source.ProjectBase + "/index.php?m=tasks&a=todo";
        }

        public override string GetActiveTasksUrl(Source source)
        {
            return source.ProjectBase + "/index.php?m=tasks&a=tasksperuser";
        }

        public override string GetProjectBaseHint(Source source)
        {
            return "Specify dotProject URL, e.g.: http://dotproject.company.com";
        }

        public override string DefaultOutlookItemBodyTemplate
        {
            get
            {
                return @"Task #ID#: #Summary#
Project #ProjectID#: #ProjectName#
#ProjectBase#/index.php?m=tasks&a=view&task_id=#ID#


Owner: #Owner#
Responsible Users: #ResponsibleUsersString#

Status: #Status#
Priority: #Priority#

Start Date: #StartDate#
End Date: #EndDate#
Progress: #Progress#%

#DescriptionText#";
            }
        }
    }
}
